<% content_for :content do %>
<%= javascript_include_tag 'livevalidation' %>
<%= javascript_include_tag 'validationFunctions' %>
<%= stylesheet_link_tag 'live_validation' %>


<h3>Wyszukaj użytkowników
</h3>

<% form_tag :action => 'index' do %>
		<p>
			<label for="user_name">Login:</label>
			<%= text_field_tag :login %>
			<%= check_box_tag :login_check, "y",true,:onchange => "switchActivation(this.id,'login')" %>
			</p>
			<p>
			<label for="user_email">Email:</label>
			<%= text_field_tag :email,'',:disabled=>true %>
			<%= check_box_tag :email_check, "y",false,:onchange => "switchActivation(this.id,'email')" %>	
			</p>	
			<p>
			<label for="user_pesel">Numer PESEL:</label>
			<%= text_field_tag :pesel,'',:disabled=>true %>
			<%= check_box_tag :pesel_check, "y",false,:onchange => "switchActivation(this.id,'pesel')" %>
			</p>
			
			<p>
				
			<label for="user_role_id">Rola w systemie:</label>	
			<%=
					select( :role,:roleID,@systemRoles)
					
			%>
			<%= check_box_tag :role_check, "y",true,:onchange => "switchActivation(this.id,'role_roleID')" %>
			</p>
				
			<p>
			<label for="user_positionID">Pozycja:</label>	
			<%=
					select_tag( :user_positionID,options_for_select(@positions),:onchange => "if_student2()",:disabled=>"disabled") 
	
			%>
				<%= check_box_tag :position_check, "y",false,:onchange => "switchStudent(this.id,'user_positionID','user_study_period','period_check')" %>
			</p>
					
			<p>
			<label for="user_study_period">Rocznik:</label>	
			<%=
				 select_tag 'user_study_period', options_for_select(@years.sort()),:disabled=>"disabled"

			%>
			<%= check_box_tag :period_check, "y",false, :onchange=> "switchActivation(this.id,'user_study_period')"%>
			</p>
			
			<p>
    		<%= submit_tag "Wyświetl użytkowników", :class => "submit" %>
			</p>
				
			
<% end %>
			
<% end %>